WORKER	=	type.c \
			list.c \
			simplebuf.c \
			queue.c \
			ilog.c \
			worker.c \
			ipc.c \
			threadsafessl.c \
			workermanager.c \
			hash.c

HFILE  = ilog.h \
			list.h \
			ipc.h \
			queue.h \
			simplebuf.h \
			inc.h \
			threadsafessl.h \
			type.h \
			worker.h \
			workermanager.h \
			hash.h

CC = gcc -g -fPIC -O0

c_worker_FILE_o	= $(WORKER:.c=.o)

LFLAGS	=	-L. \
		-L/home/hotmocha/exlib/lib
#	-L/home/idd/hotmocha/exlib/lib

IFLAGS	=	-I. \
		-I/usr/local/include \
		-I/home/hotmocha/exlib/include
#-I/home/idd/hotmocha/exlib/include

ADDLIB	=  -lcurl -lpthread -lcrypto 

.SUFFIXES:.c
.c.o    :
	$(CC) $(CFLAGS) -c $< $(IFLAGS)  

libspider.so	:	$(c_worker_FILE_o) 
	$(CC) -o $@ $(c_worker_FILE_o)  $(LFLAGS) $(ADDLIB) -shared 
clean:
	rm -rf *.o libspider.so
install:
	rm -rf ~/exlib/lib/libspider.so
	cp libspider.so ~/exlib/lib
	cp -rf $(HFILE) ~/exlib/include

checkso:
	gcc -o checkso dl.c -ldl
